using Lzfy_His_Service.Models;

namespace Lzfy_His_Service.Repositories
{
    public interface ICallLogRepository
    {
        Task<CallLog?> GetByIdAsync(int id);
        Task<IEnumerable<CallLog>> GetAllAsync();
        Task<IEnumerable<CallLog>> GetByUsernameAsync(string username);
        Task<IEnumerable<CallLog>> GetByCallPhoneAsync(string callPhone);
        Task<IEnumerable<CallLog>> GetRecentAsync(int minutes = 60);
        Task<(IEnumerable<CallLog> data, int totalCount)> GetPagedAsync(
            int pageIndex = 1,
            int pageSize = 20,
            string? username = null,
            string? callPhone = null,
            DateTime? startDate = null,
            DateTime? endDate = null);
        Task<int> CreateAsync(CallLog callLog);
        Task<bool> UpdateAsync(CallLog callLog);
        Task<bool> DeleteAsync(int id);
    }
}